package son.nt;

import son.nt.act2.ListviewCustom;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Menu;

public class SplashActivity extends Activity {
	protected static final String TAG = "SplashActivity";
	private Handler mHandler;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        mHandler = new Handler(){

			@Override
			public void handleMessage(Message msg) {
				super.handleMessage(msg);
				Intent intent = new Intent();
				intent.setClass(getBaseContext(), MainActivity.class);
//				intent.setClass(getBaseContext(), ListviewCustom.class);
				startActivity(intent);
			}
        };
        Thread mThreadLogo = new Thread(){

			@Override
			public void run() {
				super.run();
				try {
					int i = 0;
					while(i < 1000){
						sleep(100);
						i += 100;
					}
					mHandler.sendEmptyMessage(0);
				} catch (Exception e) {
				}
			}
        	
        };
        mThreadLogo.start();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.splash, menu);
        return true;
    }

    
}
